package com.smedi.ismedi.notification.core.port.adapter.persistence.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.smedi.ismedi.database.starter.model.BasicFieldEntity;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author: xulinjun
 * @Date: 2021-7-11 14:44
 */
@Data
@TableName(value = "ntf_sms_log")
public class SmsLogEntity implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "serial_no")
    private String serialNo;

    @TableField(value = "batch_id")
    private String batchId;

    @TableField(value = "message_content")
    private String messageContent;

    @TableField(value = "mobile")
    private String mobile;

    @TableField(value = "template_id")
    private Long templateId;

    @TableField(value = "status_code")
    private String statusCode;

    @TableField(value = "succeed")
    private boolean succeed;

    @TableField(value = "error_message")
    private String errorMessage;

    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Long createdUserId;

    @TableField(value = "created_date", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private LocalDateTime createdDate;

    @TableField("top_org_id")
    private String topOrgId;

    @TableField("tenant_id")
    private String tenantId;
}
